package apiday02.collection;

import java.util.ArrayList;
import java.util.Collection;

public class GenericDemo {
    public static void main(String[] args) {
        Collection<String> c = new ArrayList<>();
        c.add("abc");
//        c.add(100);
        Collection<Integer> cc = new ArrayList<>();
        cc.add(100);//自动装箱，相当于cc.add(Integer.valueOf(100));
//        cc.add("abc");




    }
}
